home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1996 / MacHack 1996.toast / Hacks / Hacks ’92 / HyperInitMaker... / Heizer Working Models / CompileIt! WM.sea / CompileIt!™.Demo ƒ / CompileIt!™ 2.1 Working Model / stack_-1.xml < prev    next >
Extensible Markup Language  |  1992-04-29  |  15KB  |  46 lines

  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <!DOCTYPE stack PUBLIC "-//Apple, Inc.//DTD stack V 2.0//EN" "" >
  3. <stack>
  4.     <name>in.1 Working Model</name>
  5.     <id>-1</id>
  6.     <cardCount>20</cardCount>
  7.     <cardID>9736</cardID>
  8.     <listID>10124</listID>
  9.     <cantModify><false /></cantModify>
  10.     <cantDelete><false /></cantDelete>
  11.     <cantAbort><false /></cantAbort>
  12.     <cardSize>
  13.         <width>512</width>
  14.         <height>342</height>
  15.     </cardSize>
  16.     <script>--            CompileIt:  HyperCard Script-to-XCMD/XFCN Compiler--                 Copyright  1992 January 8  Tom Pittman-- Stack Script: Utility Handlers -- Version 2.1on StartCompileglobal TargetStackName, ScriptedCompileResultif "CompileIt" is not in the short name of this stack then exit StartCompileput Prelude(-1) into mynameLoadnGo Prelude(8+4096),myname,field "theText",the rect of button 1get the resultPostlude it,mynameend StartCompilefunction Prelude baseflagglobal TargetStackName, ScriptedCompileResult, CompileItTemporaryif baseflag<0 thenput the long name of this stack into mynameput (the version contains "S") into supercpush cardset lockmessages to trueput "::Home::"&(the short name of this stack)&"::" into forbiddenif not superc thenset lockscreen to trueif the version‚â•2.0 thenput the windows & "::" & the stacksInUse & "::" after forbiddenrepeat while forbidden contains returnput "::" into char offset(return,forbidden) of forbiddenend repeatend ifend ifif TargetStackName is emptythen put last line of card field "TargetStackName" of card "Option Page" into TargetStackelse put TargetStackName into TargetStackif TargetStack is emptythen put "the stack to put the external" into TargetStackget returnrepeat while it is not emptygo TargetStackif ":"& the short name of this stack &"::" is in forbidden thenanswer "Can‚Äôt install there. Choose another?" with "OK" or "Cancel" or "Nowhere"else get emptyif it = "Cancel" thenpop cardexit to HyperCardelse if it = "OK" thenput "the stack to put the external" into TargetStackelse if it = "Nowhere" thenput empty into mynameget emptyelseget the long name of this stackput char offset(quote,it)+1 to length(it)-1 of it into mynameget emptyend ifend repeatpop cardset cursor to 4go card "Text Card"put "Prepare data" into field "PassInfo"if superc thenif myname is not empty then put "::go"&&quote&myname&quote&return&"go back" into mynameput PrettyPrint(field "theText") into field "theText"open resourcesselectWindow "window"&&the short name of this stackelseset lockMessages to falseset the script of field "TokenValue" to field "theText"put the script of field "TokenValue" into field "theText"set the script of field "TokenValue" to emptyset lockscreen to falsehide messagehide tool windowhide pattern windowend ifput GetResource("SIZE",0) into handif hand=0 then put GetResource("SIZE",-1) into handif hand‚â†0 then put HandlePeekByte(hand,0) into handput MemoryPartitions() into envget 2if superc then get it+32768else if the version‚â•2 then get it+34816else if fourth item of env < 1 then get it+32768else if (hand div 16) mod 2 = 1 then get it+32768if (the hilite of button 6 of card 1) is true then get it+128if not superc then if (the hilite of button 7 of card 1) is true then get it+1024put it into CompileItTemporaryreturn mynameelseget baseflag+CompileItTemporaryput 0 into CompileItTemporaryreturn itend ifend Preludeon Postlude their,mynameglobal TargetStackName, ScriptedCompileResultif first char of ScriptedCompileResult = "¬¨" thenset lockMessages to falseput first line of ScriptedCompileResult into theirdelete first char of theirget last word of theirput it into field "CPosn"put the number of lines in (char 1 to it of field "theText") into linoput return&"---"&& second line of ScriptedCompileResult &&"---"&return after line lino of field "theText"get first word of third line of ScriptedCompileResultif it is false then go TargetStackNameelse if it is true thendelete line 1 to 2 of ScriptedCompileResultput return & field "theText" after ScriptedCompileResultgo TargetStackNameelse -- otherwise no word...delete line 1 to 2 of ScriptedCompileResultif the version‚â•1.2 then select line lino of field "theText"get the number of words in theirplay "Boing"answer word 1 to it-3 of their with "Cancel"end ifelseif the version contains "S" thenclose resourcesset lockMessages to falseend ifget last line of ScriptedCompileResultif first word of it = 6 thenput second word of it into nvput third word of it into ncput fourth word of it into card field "XName" of card "Analysis"put empty into last line of ScriptedCompileResultget the number of lines in ScriptedCompileResultput line it-nc+1 to it of ScriptedCompileResult into field "CallBacks" of card "Analysis"put line it-nc-nv to it-nc of ScriptedCompileResult into field "Variables" of card "Analysis"get it-nc-nv-7put line it to it+5 of ScriptedCompileResult into card field "stats" of card "Analysis"set the scroll of field "Variables" of card "Analysis" to 0end if---  user-installed options can go here  ---if their is not empty thenget 0if the version contains "S" thendelete char 1 to offset(quote,myname) of mynamedelete char offset(quote,myname) of mynameelse if the version‚â•2.0 then if the suspended thenif TargetStackName is empty then get 1else get 2end ifgo stack mynameif it=2 then exit Postludeelse if it=1 then answer "Done"show msgdo their  --  type "put <name> ("end ifend ifend Postludefunction FasterCompile envif env is empty then put MemoryPartitions() into envput second word of card field id 25 of card "Option Page" into threshif thresh is empty then put 900 into threshget length(field "theText" of card "Text Card")if (the hilite of button 8 of card 1) is true then get it*3+40000else get it*2put GetResource("LIBR",16384) into handget (GetHandleSize(hand)+it) div 1024 + threshif first item of env < it then return 2 else return 0end FasterCompileon Locker whatif the version contains "S" thenif what then lock screen else unlock screenelse set the lockscreen to whatend Lockeron DebugTracing themsgglobal TraceFileNameif TraceFileName is empty thenput "TraceFile" into TraceFileNameopen file TraceFileNameend ifwrite themsg&return to file TraceFileNameend DebugTracingon openStackglobal ScriptedCompileResultif "CompileIt" is not in the short name of this stack thenif the number of background buttons is 0 then pass openStackif the short name of background button 1 is not "XCMD Icon" then pass openStackanswer "The name of this stack needs repair" with "Cancel" or "Rename"repeatif it is "Cancel" thengo homeexit to HyperCardelse ask "Please use ‚ÄúCompileIt‚Äù in the name:" with "CompileIt!"if it contains "CompileIt" then exit repeatanswer "Try again?" with "Cancel" or "Rename"end repeatset the name of this stack to itend ifif ScriptedCompileResult is empty thenput return into ScriptedCompileResultset the scroll of field 1 of card 2 to 0hide field 2 of card 2go card 1if the hilite of button 8 then click at the loc of button 8end ifif SuperSix(false) then SuperCardMenuselse if the version contains "S" thenselectWindow "window"&&the short name of this stackelse if false then -- the version < 2.0 thenget "Title Card;Script Page;Options;(-;Name List;Analysis;Custom Edit;(-;Examples;On-Line Help"get PictnMenu(16384,"CompileIt",it)else get PictnMenu(16384,16384)pass openStackend openStackon selectWindowif exists(menu "CompileIt") and the short name of topWindow() contains "CompileIt"then if "CompileIt" is not in menus() then insert menu "CompileIt"pass selectWindowend selectWindowfunction SuperSix testmenuif "S" is not in the version then return falseelse if (last word of the version)+0 < 1.6 then return falseelse if testmenu then return exists(menu "CompileIt")else return trueend SuperSixon SuperCardMenusselectWindow "window"&&the short name of this stackset lockmenus to trueif not exists(menu "CompileIt") thennew menu "CompileIt"get "Title Card,Script Page,Options,-,Name List,Analysis,Custom Edit,-,Examples,On-Line Help"repeat with i=1 to the number of items in itinsert item after menu "Compileit"end repeatrepeat with i=1 to the number of items in itset the name of item i of menu "CompileIt" to item i of itend repeatend ifinsert menu "CompileIt"set lockmenus to falseend SuperCardMenuson itemSelectif not SuperSix(true) then pass itemSelectif the target contains the id of menu "CompileIt"then domenu the number of the targetelse pass itemSelectend itemSelecton closeStackif "CompileIt" is not in the short name of this stack then pass closeStackif SuperSix(true) then remove menu "CompileIt"else if "S" is not in the version then get PictnMenu(16384)pass closeStackend closeStackon suspendStackif "CompileIt" is not in the short name of this stack then pass suspendStackif SuperSix(true) then remove menu "CompileIt"else if "S" is not in the version then get PictnMenu(16384)pass suspendStackend suspendStackon resumeStackif "CompileIt" is not in the short name of this stack then pass resumeStackif SuperSix(true) then insert menu "CompileIt"else if "S" is not in the version then get PictnMenu(16384,16384)pass resumeStackend resumeStackon domenu whatif "CompileIt" is not in the short name of this stack then pass domenuif the version contains "S" then get whatelse get PictnMenu(16384,what)if it=1 then go first cardelse if it=2 then go card "Text Card"else if it=3 then go card "Option Page"else if it=5 then go card "Name List"else if it=6 then go card "Analysis"else if it=7 then go card "Roll Your Own"else if it=9 then go card "Examples 0"else if it=10 then go card 2else if first word of what is "Print" thensend "GoBroke" to card 1pass domenuelse pass domenuend domenuon GoBrokeend GoBrokeon closeCardif "CompileIt" is not in the short name of this stack then pass closeCardif Balloons() then get Balloons(space)pass closeCardend closeCardon BalloonHelp cdbg,helptext,therect,thetipif Balloons() thenput cdbg&" field "&quote&helptext&quote into fxdo "get "&fxif it is empty thendo "put field "&quote&helptext&quote&" of card 2 into "&fxdo "get "&fx--do "get field "&quote&helptext&quote&" of card 2"end ifif length(it)>255 then get last line of itget Balloons(it,therect,thetip)end ifend BalloonHelpfunction HelpTest cdbg,helptextglobal CompileItTemporaryput cdbg&" field "&quote&helptext&quote into fxif the optionKey & the shiftKey & the commandKey contains down thenif the mouse is down thenif Balloons() then get Balloons(space)do "get "&fxif it is empty then do "put field "&quote&helptext&quote&" of card 2 into "&fxdo "show "&fxrepeat while the mouse is downend repeatend ifdo "hide "&fxput the ticks into CompileItTemporaryreturn falseelsedo "get the visible of "&fxif it is true thendo "hide "&fxput the ticks into CompileItTemporaryreturn falseelse return (the ticks - 60 > CompileItTemporary)end ifend HelpTeston BriansFolly who,hiliterif the hilite of button hiliter of card 1 thenset the icon of button who of card 1 to "squareslider"set the hilite of button hiliter of card 1 to falseif hiliter=8 thenset the icon of button "DebugChek" of card "Text Card" to "squareslider"else if hiliter=6 thenset the icon of button "SaneChek" of card "Text Card" to "squareslider"end ifelseset the icon of button who of card 1 to "checkedsquare"set the hilite of button hiliter of card 1 to trueif hiliter=8 thenset the icon of button "DebugChek" of card "Text Card" to "checkedsquare"else if hiliter=6 thenset the icon of button "SaneChek" of card "Text Card" to "checkedsquare"end ifend ifend BriansFollyon TransferText clickitif the version contains "S" then go card "Text Card"put empty into field "PassInfo" of card "Text Card"put empty into field "CPosn" of card "Text Card"set lockMessages to truego card "Text Card"if clickit thenif the number of words in field "theText" > 0 thenif the hilite of button 1 of card "Option Page" thenLocker falseanswer "Replace previous script?" with "Cancel" or "OK"if it="Cancel" then exit to HyperCardend ifend ifput empty into field "theText"get rect of field "theText"click at (item 1 of it)+2,(item 2 of it)+2end ifend TransferTexton CommandKeyDown theKeyif theKey="d" then BriansFolly 3,8else pass CommandKeyDownend CommandKeyDownon mouseDownif "CompileIt" is not in the short name of this stack then pass mouseDownif the number of this card is 1 then get HelpTest("card","none")end mouseDown</script>
  17.     <background id="2691" file="background_2691.xml" name="Help screens" />
  18.     <background id="4193" file="background_4193.xml" name="Names & Examples" />
  19.     <background id="5595" file="background_5595.xml" name="" />
  20.     <background id="6496" file="background_6496.xml" name="Back wall" />
  21.     <background id="9009" file="background_9009.xml" name="Symbol Manager" />
  22.     <background id="12755" file="background_12755.xml" name="Updater" />
  23.     <background id="13914" file="background_13914.xml" name="TextData" />
  24.     <background id="41724" file="background_41724.xml" name="Title" />
  25.     <card id="9736" file="card_9736.xml" marked="false" name="Intro Card" owner="41724" />
  26.     <card id="29033" file="card_29033.xml" marked="false" name="Info 0" owner="2691" />
  27.     <card id="5290" file="card_5290.xml" marked="false" name="DebugIt Info" owner="4193" />
  28.     <card id="3369" file="card_3369.xml" marked="false" name="Name List" owner="4193" />
  29.     <card id="49422" file="card_49422.xml" marked="false" name="Examples 0" owner="4193" />
  30.     <card id="5872" file="card_5872.xml" marked="false" name="Option Page" owner="4193" />
  31.     <card id="13719" file="card_13719.xml" marked="false" name="Text Card" owner="13914" />
  32.     <card id="8509" file="card_8509.xml" marked="false" name="Analysis" owner="5595" />
  33.     <card id="9232" file="card_9232.xml" marked="false" name="Sym 1" owner="9009" />
  34.     <card id="10603" file="card_10603.xml" marked="false" name="Sym 2" owner="9009" />
  35.     <card id="10775" file="card_10775.xml" marked="false" name="Sym 3" owner="9009" />
  36.     <card id="13504" file="card_13504.xml" marked="false" name="Sym 9" owner="9009" />
  37.     <card id="15379" file="card_15379.xml" marked="false" name="Sym 10" owner="9009" />
  38.     <card id="11398" file="card_11398.xml" marked="false" name="Sym 5" owner="9009" />
  39.     <card id="3947" file="card_3947.xml" marked="false" name="Sym 11" owner="9009" />
  40.     <card id="12519" file="card_12519.xml" marked="false" name="Roll Your Own" owner="9009" />
  41.     <card id="7194" file="card_7194.xml" marked="false" name="Sym 14" owner="9009" />
  42.     <card id="8114" file="card_8114.xml" marked="false" name="Sym 000" owner="9009" />
  43.     <card id="12988" file="card_12988.xml" marked="false" name="Updater" owner="12755" />
  44.     <card id="6943" file="card_6943.xml" marked="false" name="Last Card" owner="6496" />
  45. </stack>
  46.